﻿
@{
    Layout = null;
}

<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>用户维护</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link href="~/Content/X-admin/css/font.css" rel="stylesheet" />
    <script src="~/Content/X-admin/lib/layui/layui.js"></script>
    <link href="~/Content/X-admin/css/xadmin.css" rel="stylesheet" />
    <script src="~/Content/X-admin/js/jquery.min.js"></script>
    <script src="~/Content/X-admin/js/xadmin.js"></script>
    <script src="~/Content/Scripts/Basis/UserJs.js"></script>
    <link href="~/Content/Scripts/Select2/select2.min.css" rel="stylesheet" />
    <script src="~/Content/Scripts/Select2/select2.min.js"></script>
    <script src="~/Content/Scripts/System/Common.js"></script>
    <script src="~/Content/Scripts/Basis/WarrantiesJs.js"></script>
    <script>
        $(function () {
            $("#typeCode").click(function () {
                ClickTypeInput();
            })
            $("#InvenCode").click(function () {
                ClickInvenInput();
            })
        })

        layui.use('form', function () {
            var form = layui.form;
            //监听提交
            form.on('submit(formDemo)', function (data) {
                var formJson = FormToJson("UserForm");
                console.log(formJson);
                return false;
            });
        });
    </script>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-row">
            <form class="layui-form" action="" style="margin-left:30%;" id="UserForm">
                    <div class="layui-form-item">
                        <label class="layui-form-label">类别编号：</label>
                        <div class="layui-input-inline">
                            <input type="text" name="typeCode" required lay-verify="required" placeholder="请选择类别" autocomplete="off" class="layui-input" id="typeCode">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">存货编号：</label>
                        <div class="layui-input-inline">
                            <input type="text" name="InvenCode" required lay-verify="required" placeholder="请选择存货" autocomplete="off" class="layui-input" id="InvenCode">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">使用年限：</label>
                        <div class="layui-input-inline">
                            <input type="text" name="usefulYear" required lay-verify="required" placeholder="请输入年限" autocomplete="off" class="layui-input" id="usefulYear" oninput = "value=value.replace(/[^\d]/g,'')" maxlength="10">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="formDemo" style="margin-left:30px;">立即提交</button>
                        </div>
                    </div>
            </form>
        </div>
    </div>
</body>
</html>

